package com.webbei.custom.action;

import com.webbei.custom.service.CustomSer;
import com.webbei.myCustom.action.MyUtil;

public class Word2Pic {

	private String word;
	private int size;
	private String color;
	private String family;
	private int width;
	private int height;
	
	private String filename;
	
	private CustomSer cs;
	
	public String execute(){
		System.out.println(size);
		width = MyUtil.stringLength(word, size);
		height = (int)(1.3*size);
		
		filename = cs.drawWord(word, size, color, family);
		
		return "success";
	}

	public void setWord(String word) {
		this.word = word;
	}

	public void setSize(int size) {
		this.size = size;
	}

	public void setColor(String color) {
		this.color = color;
	}

	public void setFamily(String family) {
		this.family = family;
	}


	public void setCs(CustomSer cs) {
		this.cs = cs;
	}

	public String getFilename() {
		return filename;
	}

	public int getWidth() {
		return width;
	}

	public int getHeight() {
		return height;
	}
	
}
